home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 261 / SOMC Family Forum 261.iso / Xtras / Behavior Library.cst / 00006_Script_Go to Next Marker < prev    next >
Text File  |  1997-11-17  |  1KB  |  50 lines

  1. -- Marker    Go to      Next 
  2.  
  3. -- Nav
  4. -- behavior library version 1.1
  5.  
  6. -- drag to a sprite 
  7. -- goes to next marker on author selected event
  8. -- also functions through lingo by handling message 'initGotoNextMarker', 
  9. -- for example if this behavior was assigned to sprite 5, use
  10. -- sendsprite 5, #initGotoNextMarker
  11.  
  12. property whichEvent
  13.  
  14. on initGotoNextMarker me
  15.   init me
  16. end
  17.  
  18. on mouseUp me
  19.   if whichEvent = #mouseup    then init me
  20. end
  21.  
  22. on prepareFrame me
  23.   if whichEvent = #prepareframe then init me
  24. end
  25.  
  26. on exitFrame me
  27.   if whichEvent = #exitframe  then init me
  28. end
  29.  
  30. on init me
  31.   go to marker (1)
  32. end
  33.  
  34.  
  35.  
  36. ---
  37.  
  38. on getPropertyDescriptionList
  39.   
  40.   set p_list = [     #WhichEvent: [ #comment:  "Initializing Event:",                     #format:   #symbol,                      #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitGotoNextMarker],                    #default:   #MouseUp ]                  ]
  41.   return p_list
  42.   
  43. end
  44.  
  45. on getBehaviorDescription
  46.   return "Moves the Playback Head to the next marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & "PARAMETERS:" && RETURN & "ò Initializing Event - Specify the event that triggers the behavior."
  47.   
  48. end
  49.  
  50.